package com.wangsd.web.face.entity;

import com.baomidou.mybatisplus.annotation.*;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.persistence.*;
import java.io.Serializable;
import java.util.Date;


@Data
@Entity
@Table(name = "refund_record")
@ApiModel(value = "退款记录", description = "退款记录")
public class RefundRecord implements Serializable {


    @ApiModelProperty(value = "门店id")
    private Long storeId;

    @ApiModelProperty(value = "交易用户id")
    private String userId;

    @ApiModelProperty(value = "0,未完成，1完成")
    @Column(name = "status", columnDefinition = "int(1) default 0 not null")
    private Integer status;

    @ApiModelProperty(value = "1,微信;2,支付宝")
    private Integer payType;

    @ApiModelProperty(value = "退款金额")
    private Long refundFee;

    @ApiModelProperty(value = "商户自有订单ID")
    private String outTradeNo;

    @ApiModelProperty(value = "交易订单号")
    private String transactionId;

    @ApiModelProperty(value = "商户退款单号")
    private String outRefundNo;
    /**
     * 以下是通用字段
     */
    @Id
    @TableId(type = IdType.AUTO)
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    private Long id;

    @ApiModelProperty(value = "创建时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @TableField(fill = FieldFill.INSERT)
    private Date createdTime;

    @ApiModelProperty(value = "修改时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @TableField(fill = FieldFill.INSERT_UPDATE)
    private Date updatedTime;

    @TableLogic
    @TableField(fill = FieldFill.INSERT)
    private Integer deleted;

    @ApiModelProperty(value = "检索标识")
    private String code;
}
